package com.cinyi.ormx.android.model;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import com.cinyi.ormlite.annotation.TConstrains;
import com.cinyi.ormlite.annotation.TField;
import com.cinyi.ormlite.annotation.TTable;
import com.cinyi.ormx.android.App;
import com.cinyi.ormx.android.model.AndroidBaseModel;

@TTable("tuser")
public class Tuser extends AndroidBaseModel {
	@TField(name="id",constrains=@TConstrains(primaryKey=true),length=36)
	private String id;
	
	@TField(name = "name",constrains=@TConstrains(notNull=true) , length=100)
	private String name;
	
	@TField(name = "CREATEDATETIME",constrains=@TConstrains(notNull=true) , type=Date.class)
	private Date createdatetime;
	
	@TField(name = "MODIFYDATETIME",constrains=@TConstrains(notNull=true) , type=Date.class)
	private Date modifydatetime;
	
	@TField(name = "pwd",constrains=@TConstrains(notNull=true) , length=100)
	private String pwd;
	
	@TField(name = "created", length=100)
    private String created;
    
	private Set<Trole> troles = new HashSet<Trole>(0);

	public Tuser() {
		super(App.getInstance().getApplicationContext());
	}

	public Tuser(String id, String name, String pwd) {
		super(App.getInstance().getApplicationContext());
		this.id = id;
		this.name = name;
		this.pwd = pwd;
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getCreatedatetime() {
		return this.createdatetime;
	}

	public void setCreatedatetime(Date createdatetime) {
		this.createdatetime = createdatetime;
	}

	public Date getModifydatetime() {
		return this.modifydatetime;
	}

	public void setModifydatetime(Date modifydatetime) {
		this.modifydatetime = modifydatetime;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPwd() {
		return this.pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public Set<Trole> getTroles() {
		return this.troles;
	}

	public void setTroles(Set<Trole> troles) {
		this.troles = troles;
	}

    public String getCreated()
    {
        return created;
    }

    public void setCreated(String created)
    {
        this.created = created;
    }

}
